﻿


-- 查询无人员的卡信息
create procedure [dbo].[CaInfo_GetHaveNoPerson]
@kh varchar(10) = null,
@kbs varchar(20) = null
as
select kh,kbs
from Ca_Info
where sfyx=1
and kh not in(select kh from RyCa_Info where cxsj is null)
and (@kh is null or kh=@kh) 
and (@kbs is null or kbs like @kbs+'%') 
order by kbs desc